<table cellpadding="0" cellspacing="0">
  <tbody>
<tr id="<%= element_row_id(@options) %>">
  <td id="<%= element_cell_id(@options) %>" class="crud">
	 	<div class="<%= @options[:action] %>">
      <h4><%= Inflector.titleize(@options[:action]) + " " + @options[:scaffold_model].label.singularize %></h4>

			<%= render :partial => 'shared/messages' %>

			<% unless @one_row.nil? %>
			<%= error_messages_for 'one_row' %>
			<% end %>
<%
	view_folder = "/" + @options[:controller]
	view_file = "form"
 	view_folder = "shared" unless Dir["#{RAILS_ROOT}/app/views#{view_folder}/_#{view_file}.rhtml"].length > 0
	view_file = view_folder + '/' + view_file
%> 
<%#= debug @options[:one_row] %>
<fieldset>
	<!--[form:event]-->
		<% 
			table_row = @one_row
	  	for scaffold_column in scaffold_columns 
#FIXME 2006-07-06 Level=0 - Show <div> is not including the last row of data
		%>
			<% if scaffold_column.viewable_in_show? %>						
					<div class="row">
						<div class="form-element-left">
						  <label for="<%="one_row_#{scaffold_column.name}"%>"><%=column_label scaffold_column%></label>
						</div>
						<div class="form-element-right">
							<div class="show_field">
								<%=list_field_by_type(table_row, scaffold_column)%>&nbsp;
							</div>
						</div>
						<div class = "space-line">
						</div>
					</div>
			<% end%>
		<%
			end 
			options = {:action => :list,
								:model => @options[:parent_model] || @one_row_options[:crud_model],
								:one_only => @one_row_options[:one_only]}
			options[:action] = :view if @options[:parent_id] 
			options[:id] = @options[:parent_id] if @options[:parent_id] 
		%>
    <%= start_form_tag options, {:name => edit_model_name(@options[:scaffold_model]) }%>
    <%= hidden_field_tag "page", @options[:page] %>
		<%= hidden_field_tag sort_limit_field_name(@options[:scaffold_model]), sort_limit(@options[:scaffold_model]) %>
		<%= submit_tag "Cancel" %>
    <%= end_form_tag %>
	
	<!--[eoform:event]-->
</fieldset>
    </div>
  </td>
</tr>
  </tbody>
</table>
